﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdmAdminManage.aspx.cs"
    Inherits="LMS.SMSH.WEB.AdmAdminManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>管理员账号管理</title>
    <script src="jQuery/jquery-1.7.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#btnAddAdmin").click(function () {
                if ($("#txtAdminNo").val().length == 0) {
                    alert("管理员ID不能为空！");
                    $("#txtAdminNo").focus();
                    return false;
                }
                if ($("#txtAdminName").val().length == 0) {
                    alert("管理员姓名不能为空！");
                    $("#txtAdminName").focus();
                    return false;
                }
                if ($("#txtAdminPwd").val().length == 0) {
                    alert("管理员密码不能为空！");
                    $("#txtAdminPwd").focus();
                    return false;
                }
                return true;
            })
        })
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div style="text-align: center">
        <table border="0" cellspacing="0" cellpadding="0" style="width: 770px">
            <tr>
                <td style="width: 198px; font-weight: bold; color: #000000; height: 30; text-align: left">
                    &nbsp;&nbsp;权限管理
                </td>
                <td style="width: 580px; text-align: left; height: 30; text-align: right">
                    <span style="font-size: 10pt; color: #ff0000">* <span style="font-size: 12pt; color: #000000">
                        管理员ID </span><span>
                            <input id="txtAdminNo" type="text" runat="server" style="width: 150px" />
                        </span></span>&nbsp;
                    <asp:Button ID="btnFind" runat="server" Text="搜 索" OnClick="btnFind_Click" BorderColor="Aquamarine" />
                    &nbsp;
                </td>
            </tr>
            <tr style="font-size: 12pt; color: #000000;">
                <td style="width: 198px; text-align: left; height: 30">
                    <span style="font-size: 10pt; color: #ff0000">* 管理员 </span>
                    <input id="txtAdminName" type="text" runat="server" style="width: 100px" />
                </td>
                <td style="width: 580px; text-align: left; font-size: 12pt; color: #000000; text-align: right;
                    height: 30">
                    &nbsp;<span style="font-size: 10pt; color: #ff0000">* 密码：
                        <asp:TextBox ID="txtAdminPwd" runat="server" Width="100px" TextMode="Password"></asp:TextBox>
                        &nbsp; </span><span style="font-size: 10pt; color: #ff0000">&nbsp;</span>
                    <asp:Button ID="btnAddAdmin" runat="server" Text="添加管理员" OnClick="btnAddAdmin_Click"
                        BorderColor="Aquamarine" Width="108px" />
                    &nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnRemoveAdmin" runat="server" Text="移除权限" OnClick="btnRemoveAdmin_Click"
                        BorderColor="Aquamarine" Width="106px" />
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center" style="height: 27px">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:GridView ID="gvAdminList" runat="server" BorderColor="Black" Width="700px" AllowPaging="True"
                                AutoGenerateColumns="False" OnRowDataBound="gvAdminList_RowDataBound" OnPageIndexChanging="gvAdminList_PageIndexChanging"
                                PageSize="10">
                                <PagerSettings FirstPageText="第一页" LastPageText="最后一页" Mode="NextPreviousFirstLast"
                                    NextPageText="下一页" PreviousPageText="上一页" />
                                <RowStyle BackColor="Orange" Font-Size="Small" />
                                <PagerStyle BackColor="#FFC080" Font-Size="Small" Font-Strikeout="False" Font-Underline="False"
                                    ForeColor="Black" HorizontalAlign="Right" />
                                <Columns>
                                    <asp:TemplateField HeaderText="行编号">
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="60px" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="60px" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="全选">
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="chkHeader" runat="server" Text="全选" AutoPostBack="true" OnCheckedChanged="chkHeader_CheckedChanged" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkItem" runat="server" Text="" AutoPostBack="true" />
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="60px" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="60px" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="mesAdminId" HeaderText="管理员ID">
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="姓名" DataField="adminName">
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="密码" DataField="adminPwd">
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                </Columns>
                                <HeaderStyle BackColor="OrangeRed" />
                                <AlternatingRowStyle BackColor="NavajoWhite" />
                            </asp:GridView>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    <br />
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
